package com.fick.util;

import java.io.UnsupportedEncodingException;

public class CharEncoding {
	
	public static String isoToUtf(String s){
		if(s==null||s.length()==0){
			return "";
		}
		String s1="";
		try {
			s1= new String(s.getBytes("iso-8859-1"),"utf-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return s1;
	}
	
	public static String utfToIso(String s){
		if(s==null||s.length()==0){
			return "";
		}
		String s1="";
		try {
			s1= new String(s.getBytes("utf-8"),"iso-8859-1");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return s1;
	}

}
